
*This dofile is used to generate descriptive results on the 'unpooled' data 
**************************
version 16
set seed 123456
use "Infoseeking_unpooled", clear

****************************


***summary stat (Table 1) and overconfidence in familiar and unfamiliar (Table 3)****


global Xlist " age  sex educ_formal iqub LOC farmsize farmexp TLU gtrust2 Risk "



sutex $Xlist, label key(descstat) file (descstat.xls) title(Descriptive Statistics)  minmax  nobs replace

***************************************


*begin (Table 2)
***RQ1: are farmers overconfident? 


gen Itot=1 if TOC>0
replace Itot=0 if Itot==.
lab var Itot "Overconfident=1; familiar"
sum Itot

csgof Itot, expperc(50 50) 


gen Itot_raven=1 if RTOC>0
replace Itot_raven=0 if Itot_raven==.
lab var Itot_raven "Overconfident=1; unfamiliar"
sum Itot_raven


csgof Itot_raven, expperc(50 50)

**testing for equality of means for overconfidence in familiar and unfamiliar tasks**

 ttest Itot==Itot_raven

*end (Table 2)

**********************************


*Table 3

*Is there a correlation between overconfidence in familiar and unfamiliar tasks?

lab var TOC "Overconfidence: unfamiliar task"
lab var RTOC "Overconfidence: familiar task"


qui reg  RTOC TOC, vce (cluster got) 

outreg2  using r1.xls, keep(TOC) addtext(Controls, NO, Village FE, NO)lab replace


qui reg  RTOC TOC $Xlist V2-V10 , vce (cluster got)

outreg2  using r1.xls, keep(TOC) addtext(Controls, YES, Village FE, YES)lab append

